import request from '@/utils/request'

// 查询加班申请列表
export function listOvertime_apply(query) {
  return request({
    url: '/oa/overtime_apply/list',
    method: 'get',
    params: query
  })
}

// 查询加班申请详细
export function getOvertime_apply(id) {
  return request({
    url: '/oa/overtime_apply/' + id,
    method: 'get'
  })
}

// 新增加班申请
export function addOvertime_apply(data) {
  return request({
    url: '/oa/overtime_apply',
    method: 'post',
    data: data
  })
}

// 修改加班申请
export function updateOvertime_apply(data) {
  return request({
    url: '/oa/overtime_apply',
    method: 'put',
    data: data
  })
}

// 删除加班申请
export function delOvertime_apply(id) {
  return request({
    url: '/oa/overtime_apply/' + id,
    method: 'delete'
  })
}

// 发送邮件
export function sendEmail(data) {
  return request({
    url: '/oa/overtime_apply/sendEmail',
    method: 'post',
    data: data
  })
}

// 查询：我需要审批的请假列表
export function listApproval() {
  return request({
    url: '/oa/overtime_apply/approval/list',
    method: 'get'
  })
}

// 查询：抄送给我的请假列表
export function listCopied() {
  return request({
    url: '/oa/overtime_apply/copied/list',
    method: 'get'
  })
}
